LGUARD32 Program

LGUARD32 program is determined for a known viruses detection, including polymorphic viruses and macroviruses. As both programs AVAST32 and LGUARD32 use the same engine, their detection results are identical. The only difference is that LGUARD32 program is run from a command line only, on the contrary to a friendly user interface of AVAST32 program.



LGUARD32 Program

The command line of LGUARD32 looks as follows:

LGUARD32 @<task name> | <area name> [<parameter> ]

To run an Avast32 task write the character "@" (the "at" sign) and then its name. If the task contains spaces it must be inserted between quotation marks. If not, the program will not perform the task!

If there is no task name the LGUARD32 program will scan the set areas. You can determine how the task will be performed by parameters, similar to operating system parameters.

Examples of use:

LGUARD32 C:\WINDOWS This command runs a program for a Windows folder on the disk C:, all executable programs and OLE documents in this folder will be tested. First memory and sector of the hard disk are tested. Then all files are tested an information of which can be seen on the monitor.

At the end, Results Tab appears on the monitor. The tab includes the summary information about the just finished test informing, besides other, about the number of infected files. Information of number of virus characteristics LGUARD32 program is able to detect is shown, too.



Results Tab

The /H or /? switch
LGUARD32 program displays help, and exits.

The /V switch
LGUARD32 program displays actual viruses list that it can detect, and exits.

The d:\path parameter
The parameter specifies disk and folder, in which files have to be scanned. If this parameter is avoided, files in the main folder on the current disk are scanned. It is possible to specify more disks at once.

The d:\path\file parametr
The parameter specifies a file which will be scanned. The file must exist!

The . Parameter
The parameter specifies that the current folder on the current disk will be scanned.

The *: Parameter
The parameter specifies that all local disks will be scanned.

The #: Parameter
The parameter specifies that all network disks will be scanned. Program displays en error message if no network disk is found.

The /E [ext1;ext2;... ]switch


The switch specifies scanned file extensions.

The /T [A | E | O | D ]switch
This switch specifies file type to scan (/TA - all files, /TE - executables, /TO - OLE files, /TD - data files).

The /D switch
With this option, files in subdirectories of a given directory will not be checked. If it is omitted, such files are checked.

The /C switch
This option specifies that the entire content of the files is to be checked. By default only the first and last 8192 bytes of each file are checked, which greatly increases speed. After detecting any virus, the program automatically switches to the mode of testing the whole files.

The /M switch
With this option, only the memory and the disk boot sector will be checked for viruses. No file testing takes place.

The /B switch
The operating memory will not be checked for viruses. If, for example, you are sure that the computer contains no viruses and only wish to test diskettes, this option offers a useful short cut.

The /P switch
The program runs continuously without pause after the disk system area test, without waiting for the user's response when a virus is located. At the end, the results can be obtained from the exit codes or the report file.

The /R [file ]switch
A report file will be created listing the viruses found and containing a statistical table. If no filename is specified, the report file LGUARD32.RPT will be saved in the current directory. If /R parameter is followed by a "*", the report file also records the files, in which no virus was found.

The /Z switch
This parameter specifies that the user will have the option to delete the infected files.

For removing macroviruses it is possible to add to /Z another letter specifying the requested operation. If there is M after the /Z only the virus macro will be removed, the A letter ensure deleting of all macros, the F will delete whole file.In this case the program will ask you to give Yes or No reply. These parameters can be used together with /P (no pauses) too. The default action with /Z only deletes virus macros for exactly identified viruses and all macros for virus families.

The /X switch
This switch offers renaming of the suspicious files containing virus character-istics by the user. The first character of extension is after renaming the letter "V" (for instance COM becomes VOM, EXE becomes VXE, etc.)

The /S switch
This switch specifies that the detection of a virus will not be indicated by a beep. By default, detection of virus characteristics is accompanied by a beep.

/W [password | + ]switch This switch sets that, when a virus is detected, a user-defined message appears on the screen giving directions for further action. The message is stored in the LGUARD32.MSG file in the same directory as the LGUARD32.EXE program. If a password is specified, it must be given in order to continue the program after discovery of a virus and to interrupt the program. The parameter "+" serves to test the functioning of the message.

The /U [* | adr ]switch
On discovery of a virus in the Novell network, a message is sent to a specified network user. If no such user is specified, the message is sent to the "Supervisor" user. The recipient must be authorized to the network and specified as the recipient. A message is also sent to the system console of the network.

The /Q switch
This switch sets that, the program engine will be shut down on LGUARD32 exit.

Exit Codes:

When the LGUARD program completes its operation, it returns an exit code to the operating system. This code may then be tested either by another program or by using the batch file command IF ERRORLEVEL. The LGUARD exit code may only have the following values:

0 program ended normally, no virus found,

1 virus found in memory,

2 virus found on disk but not in memory,

3 program interrupted by user, no virus found so far,

4 error occurred during operation,

5 invalid task name used,

6 invalid switch used,

97 the program tested the displaying of user defined message,

98 program displayed list of viruses it can detect,

99 program displayed instructions for use.

The exit codes thus defined are used especially in command. Use of the exit code and the IF ERRORLEVEL is apparent also from the following example, in which the meaning of the function is indicated by the jump label:


LGUARD32 c:
if errorlevel 4 goto error
if errorlevel 3 goto interrupt
if errorlevel 2 goto diskvir
if errorlevel 1 goto memvir
echo ** no virus found on disk c: **